package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name="迪迦";
        int age=35000000;
        String gender="光";
        String[] otherInfo={"复合型","力量型","速度型"};
        Person p=new Person(name,age,gender,otherInfo);
        System.out.println(p);
        FileOutputStream fil=new FileOutputStream("person.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fil);
        oos.writeObject(p);
        System.out.println("写出完毕");
        oos.close();
    }
}
